/*
 * @Descripttion:
 * @Author: voanit
 * @Date: 2022-05-03 16:13:14
 * @LastEditors: voanit
 * @LastEditTime: 2022-05-08 11:57:54
 */
import React from 'react'
import {
  BrowserRouter as Router,
  Route,
  Link,
  NavLink,
  Switch,
  Redirect,
} from 'react-router-dom'
import First from './views/Router/admin/First'
import Second from './views/Router/admin/Second'
import Third from './views/Router/admin/Third'
import Logout from './views/Router/admin/Logout'
import './App.css'
class App extends React.Component {
  render() {
    return (
      <Router>
        <div className="app">
          <header>
            <Link to="/logout">退出</Link>
          </header>
          <div className="box">
            <div className="sideBar">
              <ul>
                <li>
                  <NavLink to="/first">first</NavLink>
                </li>
                <li>
                  <NavLink to="/second">second</NavLink>
                </li>
                <li>
                  <NavLink to="/third">third</NavLink>
                </li>
              </ul>
            </div>
            <main>
              <Route exact path="/" component={First}></Route>
              <Route path="/first" component={First}></Route>
              <Route path="/second" component={Second}></Route>
              <Route path="/third" component={Third}></Route>
              <Route path="/logout" component={Logout}></Route>
            </main>
          </div>
        </div>
      </Router>
    )
  }
}
export default App
